package com.ssy.lingxi.report.entity.report;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单新增记录表
 * @author 伍将
 * @date 2021/2/20
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "rep_order_add_record",
        indexes = {@Index(name = "rep_order_add_record_date_time_idx", columnList = "dateTime")})
public class OrderAddRecordDO implements Serializable {

    private static final long serialVersionUID = 8377640106097981861L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "order_add_record_seq")
    @SequenceGenerator(sequenceName = "rep_order_add_record_seq", name = "order_add_record_seq", allocationSize = 1)
    private Long id;

    /**
     * 会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 会员角色id
     */
    @Column(columnDefinition = "int8")
    private Long roleId;

    /**
     * 日期时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime dateTime;

    /**
     * 金额
     */
    @Column(columnDefinition = "decimal", nullable = false)
    private Double amount;

    /**
     * 订单类型：1=采购商, 2=供应商
     */
    @Column
    private Integer memberType=2;

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getMemberType() {
        return memberType;
    }

    public void setMemberType(Integer memberType) {
        this.memberType = memberType;
    }
}
